﻿using log4net;
using System;

namespace Common.Utils {
  public class Logger {

    private ILog _logger;

    private Logger( Type type ) {
      _logger = log4net.LogManager.GetLogger( type );
    }

    public static Logger GetLogger( Type type ) {
      return new Logger( type );
    }

    public void Debug( string message ) {
      _logger.Debug( message );
    }

    public void Debug(Exception exception ) {
      Debug( exception.Message, exception );
    }

    public void Debug( string message, Exception exception ) {
      _logger.Debug( message, exception );
    }

    public void DebugFormat( string format, object arg0 ) {
      _logger.DebugFormat( format, arg0 );
    }

    public void DebugFormat( string format, params object[] args ) {
      _logger.DebugFormat( format, args );
    }

    public void DebugFormat( IFormatProvider provider, string format, params object[] args ) {
      _logger.DebugFormat( provider, format, args );
    }

    public void DebugFormat( string format, object arg0, object arg1 ) {
      _logger.DebugFormat( format, arg0, arg1 );
    }

    public void DebugFormat( string format, object arg0, object arg1, object arg2 ) {
      _logger.DebugFormat( format, arg0, arg1, arg2 );
    }

    public void Error( string message ) {
      _logger.Error( message );
    }

    public void Error( Exception exception ) {
      Error( exception.Message, exception );
    }

    public void Error( string message, Exception exception ) {
      _logger.Error( message, exception );
    }

    public void ErrorFormat( string format, object arg0 ) {
      _logger.ErrorFormat( format, arg0 );
    }

    public void ErrorFormat( string format, params object[] args ) {
      _logger.ErrorFormat( format, args );
    }

    public void ErrorFormat( IFormatProvider provider, string format, params object[] args ) {
      _logger.ErrorFormat( provider, format, args );
    }

    public void ErrorFormat( string format, object arg0, object arg1 ) {
      _logger.ErrorFormat( format, arg0, arg1 );
    }

    public void ErrorFormat( string format, object arg0, object arg1, object arg2 ) {
      _logger.ErrorFormat( format, arg0, arg1, arg2 );
    }

    public void Fatal( string message ) {
      _logger.Fatal( message );
    }

    public void Fatal( Exception exception ) {
      Fatal( exception.Message, exception );
    }

    public void Fatal( string message, Exception exception ) {
      _logger.Fatal( message, exception );
    }

    public void FatalFormat( string format, object arg0 ) {
      _logger.FatalFormat( format, arg0 );
    }

    public void FatalFormat( string format, params object[] args ) {
      _logger.FatalFormat( format, args );
    }

    public void FatalFormat( IFormatProvider provider, string format, params object[] args ) {
      _logger.FatalFormat( provider, format, args );
    }

    public void FatalFormat( string format, object arg0, object arg1 ) {
      _logger.FatalFormat( format, arg0, arg1 );
    }

    public void FatalFormat( string format, object arg0, object arg1, object arg2 ) {
      _logger.FatalFormat( format, arg0, arg1, arg2 );
    }

    public void Info( string message ) {
      _logger.Info( message );
    }

    public void Info( Exception exception ) {
      Info( exception.Message, exception );
    }

    public void Info( string message, Exception exception ) {
      _logger.Info( message, exception );
    }

    public void InfoFormat( string format, object arg0 ) {
      _logger.InfoFormat( format, arg0 );
    }

    public void InfoFormat( string format, params object[] args ) {
      _logger.InfoFormat( format, args );
    }

    public void InfoFormat( IFormatProvider provider, string format, params object[] args ) {
      _logger.InfoFormat( provider, format, args );
    }

    public void InfoFormat( string format, object arg0, object arg1 ) {
      _logger.InfoFormat( format, arg0, arg1 );
    }

    public void InfoFormat( string format, object arg0, object arg1, object arg2 ) {
      _logger.InfoFormat( format, arg0, arg1, arg2 );
    }

    public void Warn( string message ) {
      _logger.Warn( message );
    }

    public void Warn( Exception exception ) {
      Warn( exception.Message, exception );
    }

    public void Warn( string message, Exception exception ) {
      _logger.Warn( message, exception );
    }

    public void WarnFormat( string format, object arg0 ) {
      _logger.WarnFormat( format, arg0 );
    }

    public void WarnFormat( string format, params object[] args ) {
      _logger.WarnFormat( format, args );
    }

    public void WarnFormat( IFormatProvider provider, string format, params object[] args ) {
      _logger.WarnFormat( provider, format, args );
    }

    public void WarnFormat( string format, object arg0, object arg1 ) {
      _logger.WarnFormat( format, arg0, arg1 );
    }

    public void WarnFormat( string format, object arg0, object arg1, object arg2 ) {
      _logger.WarnFormat( format, arg0, arg1, arg2 );
    }
  }
}
